#ifndef VISUALKUKAROBOTINSTANCE_H
#define VISUALKUKAROBOTINSTANCE_H

#include "visualkukarobotinstance_global.h"
#include "_Interface/_datastruct.h"
#include "_Interface/_interface_hmi.h"
#include "_Interface/_interface_backend.h"

#define NOERROR 1
#define UNDERTAKE 0
#define ERROR -1

#define LOCALCONTOLLER 1
#define REMOTEHMI 2


class VISUALKUKAROBOTINSTANCESHARED_EXPORT VisualKUKARobotInstance{
public:
    VisualKUKARobotInstance(short Local_Remote);
    ~VisualKUKARobotInstance();
private:
    HmiInterface* pViualKUKAHmi = nullptr;
    BackendInterface* pViualKUKABackend = nullptr;
private:
    void RegisiterBackendtoHmi();
public:
    QWidget* getUiHandle();
public:
    short task_uifast_UiDataUpdate();
    short task_uifast_ForceScopeUpdate();
    short task_uifast_LaserScopeUpdate();
    short task_uifast_RobotScopeUpdate();

    short task_maininit_ForceSensorConnect();
    short task_maininit_LaserSensorConnect();

    void  task_mainloop_ForceSensorLoopRun();
    void  task_mainloop_LaserSensorLoopRun();

    void  task_kukaloop_KUKAProcess();

    void  task_com_RemoteDataRecv(QByteArray Data);
    void  task_com_RemoteDataSend(QByteArray& Data);
};

#endif // VISUALKUKAROBOTINSTANCE_H
